package com.example.worktwo;

import android.view.View;
import android.widget.TextView;

public class OutsideClass implements View.OnClickListener{
    private MainActivity myactivity;
    private TextView Text;
    public OutsideClass(MainActivity activity, TextView text){
        this.myactivity=activity;
        this.Text=text;
    }
    @Override
    public void onClick(View v) {
        Text.setText("点击了采用外部类绑定的监听器");
    }
}
